package com.ihealthway.all.groupbuy.vo;

import org.nutz.dao.entity.annotation.*;

import java.util.Date;

/**
  * Bean class for order info design
 * @author 凡梦星尘(elkan1788@gmail.com)
 */
@Table("gb_order_info")
public class OrderInfo {

    @Name
    @Column("order_id")
    private String orderId;
    @Column("transaction_id")
    private String transactionId;
    @Column("c_id")
    private Integer companyId;
    @One(target = Company.class, field = "companyId", key = "companyId")
    private Company company;
    @Column("goods_id")
    private Integer goodsId;
    @One(target = Goods.class, field = "goodsId", key = "goodsId")
    private Goods goods;
    @Column("u_id")
    private Integer userId;
    @One(target = UserInfo.class, field = "userId", key = "userId")
    private UserInfo userInfo;
    @Column("create_time")
    private Date createTime;
    @Column("pay_time")
    private Date payTime;
    /**
     * Order status:
     * <ul>
     *     <li>0: build order</li>
     *     <li>1: not pay</li>
     *     <li>2: finish pay</li>
     *     <li>3: goods had expire but not pay</li>
     *     <li>4: apply refund</li>
     *     <li>5: finish refund</li>
     * </ul>
     */
    @Column("data_status")
    private String dataStatus;
    @Column("app_version")
    private String appVersion;
    @Column("mobile_os")
    private String mobileOS;
    @Column("network_type")
    private String networkType;
    @Column("user_agent")
    private String userAgent;
    @Column("fee_type")
    private String feeType;
    @Column("bank_type")
    private String bankType;
    @Column("cash_fee_type")
    private String cashFeeType;
    @Column("trade_type")
    private String tradeType;
    @Column("settlement_total_fee")
    private Integer settlementTotalFee;
    @Column("total_fee")
    private Integer totalFee;
    @Column("cash_fee")
    private Integer cashFee;
    @Column("result_code")
    private String resultCode;
    @Column("err_code")
    private String errCode;
    @Column("err_code_des")
    private String errCodeDes;

    private String goodsName;
    private String goodsImgUrl;
    private Integer goodsPrice;
    private Integer goodsSales;
    private String companyName;
    private String userName;

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public Integer getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }

    public Company getCompany() {
        return company;
    }

    public void setCompany(Company company) {
        this.company = company;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public UserInfo getUserInfo() {
        return userInfo;
    }

    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public String getDataStatus() {
        return dataStatus;
    }

    public void setDataStatus(String dataStatus) {
        this.dataStatus = dataStatus;
    }

    public String getAppVersion() {
        return appVersion;
    }

    public void setAppVersion(String appVersion) {
        this.appVersion = appVersion;
    }

    public String getMobileOS() {
        return mobileOS;
    }

    public void setMobileOS(String mobileOS) {
        this.mobileOS = mobileOS;
    }

    public String getNetworkType() {
        return networkType;
    }

    public void setNetworkType(String networkType) {
        this.networkType = networkType;
    }

    public String getUserAgent() {
        return userAgent;
    }

    public void setUserAgent(String userAgent) {
        this.userAgent = userAgent;
    }

    public String getFeeType() {
        return feeType;
    }

    public void setFeeType(String feeType) {
        this.feeType = feeType;
    }

    public String getBankType() {
        return bankType;
    }

    public void setBankType(String bankType) {
        this.bankType = bankType;
    }

    public String getCashFeeType() {
        return cashFeeType;
    }

    public void setCashFeeType(String cashFeeType) {
        this.cashFeeType = cashFeeType;
    }

    public String getTradeType() {
        return tradeType;
    }

    public void setTradeType(String tradeType) {
        this.tradeType = tradeType;
    }

    public Integer getSettlementTotalFee() {
        return settlementTotalFee;
    }

    public void setSettlementTotalFee(Integer settlementTotalFee) {
        this.settlementTotalFee = settlementTotalFee;
    }

    public Integer getCashFee() {
        return cashFee;
    }

    public void setCashFee(Integer cashFee) {
        this.cashFee = cashFee;
    }

    public Integer getTotalFee() {
        return totalFee;
    }

    public void setTotalFee(Integer totalFee) {
        this.totalFee = totalFee;
    }

    public String getResultCode() {
        return resultCode;
    }

    public void setResultCode(String resultCode) {
        this.resultCode = resultCode;
    }

    public String getErrCode() {
        return errCode;
    }

    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }

    public String getErrCodeDes() {
        return errCodeDes;
    }

    public void setErrCodeDes(String errCodeDes) {
        this.errCodeDes = errCodeDes;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getGoodsImgUrl() {
        return goodsImgUrl;
    }

    public void setGoodsImgUrl(String goodsImgUrl) {
        this.goodsImgUrl = goodsImgUrl;
    }

    public Integer getGoodsPrice() {
        return goodsPrice;
    }

    public void setGoodsPrice(Integer goodsPrice) {
        this.goodsPrice = goodsPrice;
    }

    public Integer getGoodsSales() {
        return goodsSales;
    }

    public void setGoodsSales(Integer goodsSales) {
        this.goodsSales = goodsSales;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Override
    public String toString() {
        return "OrderInfo{" +
                "orderId='" + orderId + '\'' +
                ", transactionId='" + transactionId + '\'' +
                ", companyId=" + companyId +
                ", goodsId=" + goodsId +
                ", userId=" + userId +
                ", createTime=" + createTime +
                ", payTime=" + payTime +
                ", dataStatus='" + dataStatus + '\'' +
                ", appVersion='" + appVersion + '\'' +
                ", mobileOS='" + mobileOS + '\'' +
                ", networkType='" + networkType + '\'' +
                ", userAgent='" + userAgent + '\'' +
                ", feeType=" + feeType +
                ", bankType='" + bankType + '\'' +
                ", cashFeeType='" + cashFeeType + '\'' +
                ", tradeType='" + tradeType + '\'' +
                ", settlementTotalFee=" + settlementTotalFee +
                ", cashFee=" + cashFee +
                ", totalFee=" + totalFee +
                ", resultCode='" + resultCode + '\'' +
                ", errCode='" + errCode + '\'' +
                ", errCodeDes='" + errCodeDes + '\'' +
                ", goodsName='" + goodsName + '\'' +
                ", goodsImgUrl='" + goodsImgUrl + '\'' +
                ", goodsPrice=" + goodsPrice +
                ", goodsSales=" + goodsSales +
                ", companyName='" + companyName + '\'' +
                ", userName='" + userName + '\'' +
                '}';
    }
}
